package com.sugon.entity.dto;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 备件耗用参数
 *
 * @author YuXD
 * @since 2023/9/12
 */
@Data
public class SpConsumeParam implements Serializable {

    /**
     * 换件类型：REPAIR(维修耗用) MAINTENANCE(维护)
     */
    @NotBlank(message = "换件类型不能为空！")
    private String type;

    @NotBlank(message = "换件类型不能为空！")
    private String businessId;

    @NotBlank(message = "必须指定领料记录！")
    private String materialRecordId;

    @NotNull(message = "换件数量必填！")
    @Min(value = 0L, message = "换件数量不得小于0！")
    private Integer num;

}
